xquery version "0.9-ml"

xs:string('<ul>')
,
 
 let $string :=  xdmp:get-request-field("node")
let $node :=  xdmp:eval( $string )
(: let $node := xdmp:eval( "doc('jasonmonberg.xml')/jasonmonberg/savedfeed" ) :)

for $result in distinct-values($node)
order by $result
return concat('<li>', $result, '</li>')
,
xs:string('</ul>')